rng(222)
clc,clear
RX=randi(5,[60,6]); 
[R,P]=corr(RX,'Type','Pearson');
[R1,P1]=corr(RX,'Type','Spearman');
% 绘制热图
figure
string_name={'厚度','孔隙率','压缩回弹性率','过滤阻力','过滤效率','透气性'};
xvalues = string_name;
yvalues = string_name;
h = heatmap(xvalues,yvalues, R, 'FontSize',10, 'FontName','宋体');
h.Title = '皮尔逊相关性';
figure
[xiangguan,~]=corr(RX,'Type','Spearman');
H = heatmap(xvalues,yvalues, xiangguan, 'FontSize',12, 'FontName','宋体');
H.Title = 'Spearman相关系数矩阵'; 
colormap default
colormap summer